home *** CD-ROM | disk | FTP | other *** search
/ Interactive CD-ROM & Web Magazine 6 / Interactive CD-ROM & Web Magazine 6.iso / pc / wingift / imaging / gotodlg.fr_ / gotodlg.fr
Text File  |  1995-12-21  |  3KB  |  118 lines

  1. VERSION 4.00
  2. Begin VB.Form frmGotoDlg 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Go To"
  5.    ClientHeight    =   1260
  6.    ClientLeft      =   4536
  7.    ClientTop       =   6996
  8.    ClientWidth     =   3108
  9.    ControlBox      =   0   'False
  10.    Height          =   1644
  11.    Left            =   4488
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1260
  16.    ScaleWidth      =   3108
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   6660
  19.    Width           =   3204
  20.    Begin VB.TextBox txtPageNo 
  21.       Height          =   330
  22.       Left            =   1440
  23.       TabIndex        =   4
  24.       Text            =   "0"
  25.       Top             =   210
  26.       Width           =   855
  27.    End
  28.    Begin VB.CommandButton cmdCancelButton 
  29.       Caption         =   "Cancel"
  30.       Height          =   330
  31.       Left            =   1680
  32.       TabIndex        =   2
  33.       Top             =   735
  34.       Width           =   1215
  35.    End
  36.    Begin VB.CommandButton cmdOKbutton 
  37.       Caption         =   "OK"
  38.       Height          =   330
  39.       Left            =   120
  40.       TabIndex        =   1
  41.       Top             =   735
  42.       Width           =   1215
  43.    End
  44.    Begin Spin.SpinButton SpinButton1 
  45.       Height          =   324
  46.       Left            =   2280
  47.       TabIndex        =   3
  48.       Top             =   216
  49.       Width           =   252
  50.       _Version        =   65536
  51.       _ExtentX        =   445
  52.       _ExtentY        =   572
  53.       _StockProps     =   73
  54.    End
  55.    Begin VB.Label lblLabel1 
  56.       Alignment       =   1  'Right Justify
  57.       Caption         =   "Go To Page"
  58.       Height          =   330
  59.       Left            =   240
  60.       TabIndex        =   0
  61.       Top             =   210
  62.       Width           =   975
  63.    End
  64. End
  65. Attribute VB_Name = "frmGotoDlg"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68.  
  69.  
  70. Private Sub cmdCancelButton_Click()
  71. Unload frmGotoDlg
  72. End Sub
  73.  
  74.  
  75. Private Sub cmdOKbutton_Click()
  76. 'convert page number text from edit box to an int
  77. 'and display the new page
  78. frmSample.oleImgEdit1.page = CInt(txtPageNo.Text)
  79. frmSample.oleImgEdit1.Display
  80. frmSample.oleImgThumbnail1.DeselectAllThumbs
  81. frmSample.oleImgThumbnail1.ThumbSelected(frmSample.oleImgEdit1.page) = True
  82. Unload frmGotoDlg
  83.  
  84. End Sub
  85.  
  86. Private Sub Form_Load()
  87. 'convert current page number to string and display
  88. 'it in edit box
  89. txtPageNo.Text = CStr(frmSample.oleImgEdit1.page)
  90. End Sub
  91.  
  92.  
  93. Private Sub SpinButton1_SpinDown()
  94. 'get page number text from edit box and convert
  95. 'it to an int
  96. selPage = CInt(txtPageNo.Text)
  97. 'decrement selected page number
  98. selPage = selPage - 1
  99. 'convert page number back to string and display it
  100. 'in edit box
  101. txtPageNo.Text = CStr(selPage)
  102. End Sub
  103.  
  104.  
  105. Private Sub SpinButton1_SpinUp()
  106. 'get page number text from edit box and convert
  107. 'it to an int
  108. selPage = CInt(txtPageNo.Text)
  109. 'increment selected page number
  110. selPage = selPage + 1
  111. 'convert page number back to string and display it
  112. 'in edit box
  113. txtPageNo.Text = CStr(selPage)
  114.  
  115. End Sub
  116.  
  117.  
  118.